﻿#include <iostream>
#include<iostream>

using namespace std;

class Time

{

public:
	Time(int hour = 2) 

	
		:_hour(hour)
	{
		cout << "Time()" << endl;
	}

private:
	int _hour;
};




class Date

{

public:
	Date(int& rf, int year = 1, int month = 1, int day = 1, int n =2 , int t = 1)

		:_year(year)
		, _month(month)
	    , _day(day)
		, _n(n)
		, _ref(rf)
		, _t(t)
	{

	}
	
	
	void Print() const

	{
		cout << _year << "-" << _month << "-" << _day << endl;
	}

private:
	//声明给的都是缺省值
	int _year = 2;//缺省值
	int _month = 2;
	int _day = 2;
	Time _t ; 
	int& _ref; // 引⽤ 
	const int _n = 10; // const 

};

int main()
{
	int i = 0;
	Date d1(i);
	d1.Print();
	return 0;
}
const int& j = 1;
